/*
 * @Author: 清香白莲 1243327527@qq.com
 * @Date: 2023-08-16 14:49:33
 * @LastEditors: 清香白莲 1243327527@qq.com
 * @LastEditTime: 2023-09-20 17:41:20
 * @FilePath: /shang_study/src/api/index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from './request';
import mockRequest from './mockAjax';

// 三级联动接口
export const reqCategoryList = () => request({url:'api/product/getBaseCategoryList', method: 'get'})
// 首页轮播图接口
export const reqPostSearch = (data) => request.post('api/list', data);

// 首页轮播图接口
export const reqGetBannerList = () => mockRequest.get('/banner');
// Floor数组接口
export const reqGetFloorList = () => mockRequest.get('/floor');

// 商品详情接口
export const reqGetGoodsDetail = (skuId) => request.get(`/api/item/${skuId}`);

// 添加至购物车
export const reqPostAddCar = (skuId, skuNum) => request.post(`api/cart/addToCart/${skuId}/${skuNum}`);

// 获取购物车列表
export const reqGetCartList = () => request.get('/api/cart/cartList');